package Application.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import Application.entity.Collect;

public interface CollectDao {
		@Insert("insert into collect(collectorid,essayid)value(#{collectorid},#{essayid})")
		@Options(useGeneratedKeys=true,keyProperty="id",keyColumn="id")
		public void addCollect(Collect collect);
		
		@Delete("delete from collect where id=#{id}")
		public void removeCollect(int id);

		@Select("select * from collect where collectorid=#{collectorid}")
		public List<Collect> findUserCollect(int id);
}
